import * as mutats from '../mutation-list'

const state = {
  user: {}
}

const getter = {
  authUser: state => state.user
}

const actions = {
  createUser ({commit}, user) {
    commit(mutats.CREATE_USER)
  }
}

const mutations = {
  [mutats.CREATE_USER] (state, user) {
    state.user = user
  }
}

export default {
  state,
  getter,
  actions,
  mutations
}
